import socket
user_socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
user_socket.connect(("127.0.0.1",8888))
while True:
    cmd = input(">>>")
    user_socket.send(cmd.encode("utf-8"))
    print("发送成功!")
    data = user_socket.recv(1024)
    print("服务器发来的消息: %s"%data.decode("utf-8"))
